/*
 * The contents of this file are subject to the terms
 * of the Common Development and Distribution License
 * (the License).  You may not use this file except in
 * compliance with the License.
 *
 * You can obtain a copy of the license at
 * http://www.sun.com/cddl/cddl.html or
 * at portlet-repository/CDDLv1.0.txt.
 * See the License for the specific language governing
 * permissions and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL
 * Header Notice in each file and include the License file
 * at portlet-repository/CDDLv1.0.txt.
 * If applicable, add the following below the CDDL Header,
 * with the fields enclosed by brackets [] replaced by
 * you own identifying information:
 * "Portions Copyrighted [year] [name of copyright owner]"
 *
 *  Portions Copyrighted 2007
 */

package com.meritit.product.portlets;


import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import java.io.IOException;
import java.util.ResourceBundle;


/**
 * WelcomePortlet Portlet Class
 *
 */
public class WelcomePortlet extends GenericPortlet {

    public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {

        response.setContentType(request.getResponseContentType());
        StringBuffer buffer = new StringBuffer();
        buffer.append("Hello, Portlet");
        buffer.append("&nbsp;");
        buffer.append(request.getPortalContext().getPortalInfo());
        response.getWriter().write(buffer.toString());
    }

    @Override
    protected void doHelp(RenderRequest request, RenderResponse response) throws PortletException, IOException {
       response.getWriter().print("This is the help page");
    }
}